import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/LoginView.vue')
  },
  {
    path: '/emp',
    name: 'emp',
    component: () => import( '../views/EmpManage.vue')
  },
  {
    path: '/cus',
    name: 'cus',
    component: () => import( '../views/CustomerManage.vue')
  },
  {
    path: '/goods',
    name: 'goods',
    component: () => import( '../views/GoodsManage.vue')
  },
  {
    path: '/mainBuy',
    name: 'mainBuy',
    component: () => import( '../views/MainBuying.vue')
  },
  {
    path: '/payDetail',
    name: 'payDetail',
    component: () => import( '../views/PayDetail.vue')
  },
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/log2',
    name: 'log2',
    component: () => import( '../views/LoginView1.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
